package com.s3.khospitalds.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.s3.khospitalds.entity.Patientcount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author hlq
 * @version 1.0
 * @Description
 * @date 2025/3/3 14:30
 */
@Mapper
@Repository
public interface PatientCountMapper extends BaseMapper<Patientcount> {
    //查询一周的挂号量
    @Select("select \n" +
            "  department,\n" +
            "  `date`,\n" +
            "  number\n" +
            "from \n" +
            "  patientcount\n" +
            "where \n" +
            "  date between '2017-08-06' and '2017-08-12'\n" +
            "group by \n" +
            "  department, `date`,number\n" +
            "order by `date`, department")
    public List<Patientcount> AllPatientCount();
}
